﻿<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser;$(NetCoreAppCurrent)-wasi;$(NetCoreAppCurrent)</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <ILLinkKeepDepAttributes>false</ILLinkKeepDepAttributes> <!-- See comments in Cookie.cs -->
    <!-- SYSTEM_NET_PRIMITIVES_DLL is required to allow source-level code sharing for types defined within the
         System.Net.Internals namespace. -->
    <DefineConstants>$(DefineConstants);SYSTEM_NET_PRIMITIVES_DLL</DefineConstants>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.PlatformNotSupported_NetPrimitives</GeneratePlatformNotSupportedAssemblyMessage>
    <GenAPIExcludeApiList>ReferenceAssemblyExclusions.txt</GenAPIExcludeApiList>
  </PropertyGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
    <Compile Include="System\Net\AuthenticationSchemes.cs" />
    <Compile Include="System\Net\Cookie.cs" />
    <Compile Include="System\Net\CookieContainer.cs" />
    <Compile Include="System\Net\CookieCollection.cs" />
    <Compile Include="System\Net\CookieException.cs" />
    <Compile Include="System\Net\CredentialCache.cs" />
    <Compile Include="System\Net\DecompressionMethods.cs" />
    <Compile Include="System\Net\DnsEndPoint.cs" />
    <Compile Include="System\Net\EndPoint.cs" />
    <Compile Include="System\Net\HttpStatusCode.cs" />
    <Compile Include="System\Net\HttpVersion.cs" />
    <Compile Include="System\Net\ICredentials.cs" />
    <Compile Include="System\Net\ICredentialsByHost.cs" />
    <Compile Include="System\Net\IPAddress.cs" />
    <Compile Include="System\Net\IPNetwork.cs" />
    <Compile Include="System\Net\IPAddressParser.cs" />
    <Compile Include="System\Net\IPEndPoint.cs" />
    <Compile Include="$(CommonPath)System\Net\IPv4AddressHelper.Common.cs"
             Link="System\Net\IPv4AddressHelper.Common.cs" />
    <Compile Include="$(CommonPath)System\Net\IPv6AddressHelper.Common.cs"
             Link="System\Net\IPv6AddressHelper.Common.cs" />
    <Compile Include="System\Net\IWebProxy.cs" />
    <Compile Include="System\Net\NetEventSource.Primitives.cs" />
    <Compile Include="System\Net\NetworkCredential.cs" />
    <Compile Include="System\Net\TransportContext.cs" />
    <Compile Include="System\Net\SocketException.cs" />
    <Compile Include="System\Net\SecureProtocols\NegotiateEnumTypes.cs" />
    <Compile Include="System\Net\SecureProtocols\SslEnumTypes.cs" />
    <Compile Include="System\Net\Security\SslPolicyErrors.cs" />
    <Compile Include="System\Net\Sockets\AddressFamily.cs" />
    <Compile Include="System\Net\Sockets\SocketError.cs" />
    <Compile Include="System\Net\NetworkInformation\IPAddressCollection.cs" />
    <Compile Include="System\Net\Cache\RequestCacheLevel.cs" />
    <Compile Include="System\Net\Cache\RequestCachePolicy.cs" />
    <Compile Include="System\Security\Authentication\ExtendedProtection\ChannelBinding.cs" />
    <Compile Include="System\Security\Authentication\ExtendedProtection\ChannelBindingKind.cs" />
    <Compile Include="$(CommonPath)System\Net\CookieComparer.cs"
             Link="ProductionCode\System\Net\CookieComparer.cs" />
    <Compile Include="$(CommonPath)System\Net\CookieFields.cs"
             Link="Common\System\Net\CookieFields.cs" />
    <Compile Include="$(CommonPath)System\Net\CookieParser.cs"
             Link="Common\System\Net\CookieParser.cs" />
    <Compile Include="$(CommonPath)System\Net\IPAddressParserStatics.cs"
             Link="Common\System\Net\IPAddressParserStatics.cs" />
    <Compile Include="$(CommonPath)System\Net\IPEndPointExtensions.cs"
                 Link="Common\System\Net\IPEndPointExtensions.cs" />
    <Compile Include="$(CommonPath)System\Net\HttpKnownHeaderNames.cs"
             Link="Common\System\Net\HttpKnownHeaderNames.cs" />
    <Compile Include="$(CommonPath)System\Net\TcpValidationHelpers.cs"
             Link="Common\System\Net\TcpValidationHelpers.cs" />
    <Compile Include="$(CommonPath)System\Net\UriScheme.cs"
             Link="Common\System\Net\UriScheme.cs" />
    <Compile Include="$(CommonPath)System\Net\SocketAddress.cs"
             Link="Common\System\Net\SocketAddress.cs" />
    <Compile Include="$(CommonPath)System\Net\SocketAddressExtensions.cs"
             Link="Common\System\Net\SocketAddressExtensions.cs" />
    <Compile Include="$(CommonPath)System\Net\NegotiationInfoClass.cs"
             Link="Common\System\Net\NegotiationInfoClass.cs" />
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformation.cs"
             Link="Common\System\Net\NetworkInformation\HostInformation.cs" />
    <Compile Include="$(CommonPath)System\Text\StringBuilderCache.cs"
             Link="Common\System\Text\StringBuilderCache.cs" />
    <Compile Include="$(CommonPath)System\HexConverter.cs"
             Link="Common\System\HexConverter.cs" />
    <!-- Logging -->
    <Compile Include="$(CommonPath)System\Net\Logging\NetEventSource.Common.cs"
             Link="Common\System\Net\Logging\NetEventSource.Common.cs" />
    <Compile Include="$(CommonPath)System\NotImplemented.cs"
             Link="Common\System\NotImplemented.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.Alg.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.Alg.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\SChannel\Interop.SchProtocols.cs"
             Link="Common\Interop\Windows\SChannel\Interop.SchProtocols.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WinSock\Interop.ErrorCodes.cs"
             Link="Common\Interop\Windows\WinSock\Interop.ErrorCodes.cs" />
    <!-- Common -->
    <Compile Include="$(CommonPath)System\Obsoletions.cs"
             Link="Common\System\Obsoletions.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
    <Compile Include="System\Net\SocketException.Windows.cs" />
    <Compile Include="$(CommonPath)System\Net\SocketAddressPal.Windows.cs"
             Link="Common\System\Net\SocketAddressPal.Windows.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.ErrorCodes.cs"
             Link="Common\Interop\Windows\IpHlpApi\Interop.ErrorCodes.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.FIXED_INFO.cs"
             Link="Common\Interop\Windows\IpHlpApi\Interop.FIXED_INFO.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.IP_ADDR_STRING.cs"
             Link="Common\Interop\Windows\IpHlpApi\Interop.IP_ADDR_STRING.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
             Link="Common\Interop\Windows\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformationPal.Windows.cs"
             Link="Common\System\Net\NetworkInformation\HostInformationPal.Windows.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.GetNetworkParams.cs"
             Link="Common\Interop\Windows\IpHlpApi\Interop.GetNetworkParams.cs" />
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\InterfaceInfoPal.Windows.cs"
             Link="Common\System\Net\NetworkInformation\InterfaceInfoPal.Windows.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.if_nametoindex.cs"
             Link="Common\Interop\Windows\IpHlpApi\Interop.if_nametoindex.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix' or '$(TargetPlatformIdentifier)' == 'browser' or '$(TargetPlatformIdentifier)' == 'wasi'">
    <Compile Include="System\Net\SocketException.Unix.cs" />
    <Compile Include="$(CommonPath)System\Net\SocketAddressPal.Unix.cs"
             Link="Common\System\Net\SocketAddressPal.Unix.cs" />
    <Compile Include="$(CommonPath)System\Net\Sockets\SocketErrorPal.Unix.cs"
             Link="Common\System\Net\Sockets\SocketErrorPal.Unix.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\Interop.Errors.cs"
             Link="Common\Interop\Unix\Interop.Errors.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
             Link="Common\Interop\Unix\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.IPAddress.cs"
             Link="Common\Interop\Unix\System.Native\Interop.IPAddress.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.SocketAddress.cs"
             Link="Common\Interop\Unix\System.Native\Interop.SocketAddress.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix'">
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformationPal.Unix.cs"
             Link="Common\System\Net\NetworkInformation\HostInformationPal.Unix.cs" />
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\InterfaceInfoPal.Unix.cs"
             Link="Common\System\Net\NetworkInformation\InterfaceInfoPal.Unix.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.GetDomainName.cs"
             Link="Common\Interop\Unix\System.Native\Interop.GetDomainName.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.GetHostName.cs"
             Link="Common\Interop\Unix\System.Native\Interop.GetHostName.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.GetNameInfo.cs"
             Link="Common\Interop\Unix\System.Native\Interop.GetNameInfo.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.HostEntry.cs"
             Link="Common\Interop\Unix\System.Native\Interop.HostEntry.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.InterfaceNameToIndex.cs"
             Link="Common\Interop\Unix\System.Native\Interop.InterfaceNameToIndex.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'browser' or '$(TargetPlatformIdentifier)' == 'wasi'">
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformationPal.Browser.cs"
             Link="Common\System\Net\NetworkInformation\HostInformationPal.Browser.cs" />
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\InterfaceInfoPal.Browser.cs"
             Link="Common\System\Net\NetworkInformation\InterfaceInfoPal.Browser.cs" />
  </ItemGroup>

  <ItemGroup>
    <Reference Include="Microsoft.Win32.Primitives" />
    <Reference Include="System.Collections" />
    <Reference Include="System.Collections.NonGeneric" />
    <Reference Include="System.Diagnostics.Tracing" />
    <Reference Include="System.Memory" />
    <Reference Include="System.Runtime" />
    <Reference Include="System.Runtime.InteropServices" />
    <Reference Include="System.Runtime.Intrinsics" />
    <Reference Include="System.Threading" />
  </ItemGroup>

</Project>
